#!/bin/bash

[ -f custom.txt ] || exit 1

gfwlist=gfwlistx.txt

cat gfwlist.txt | base64 -d | head -n -1 > $gfwlist
echo >> $gfwlist
cat custom.txt >> $gfwlist
echo '!---------------------EOF-----------------------' >> $gfwlist

cat $gfwlist | base64 -w 64 > $gfwlist.tmp
mv $gfwlist.tmp $gfwlist
